/**
 * 高精度:乘法
 * @param a string|number 被乘数
 * @param b string|number 乘数
 * @return string
 */
$.bcMul = function(a, b){
	const T0=v=>v.replace(/^0+/,''), R0=n=>'0'.repeat(n);
	$.bcMul = function(a, b){
		const [a_,ai,A]=$.bcArr(a), [b_,bi,B]=$.bcArr(b);
		a=T0(ai+A);  b=T0(bi+B);  if(!a||!b) return '0';
		let v='0', _=a_!==b_?'-':'', M=A.length+B.length;
		if(a==='1') v=b; else if(b==='1') v=a;
		else{
			const A=a.length, B=b.length, N=A+B-2;
			for(let i=0; i<A; i++){
				const x=a[i]; if(x==='0') continue;
				for(let j=0, n=N-i, y; j<B; j++){
					y=b[j];  if(y==='0') continue;
					v=$.bcAddInt(v, (x*y)+R0(n-j));
				}
			}
		}
		if(!M) return _+v;  const n=v.length;
		if(n<M+1) v=R0(M+1-n)+v; //长度至少1位整数
		const dot = v.slice(-M).replace(/0+$/,'');
		return _+v.slice(0,-M)+(dot?'.'+dot:'');
	};
	return $.bcMul(a, b);
};
